
#ifndef __RT_REMOVETRACE_H__
#define __RT_REMOVETRACE_H__

#include "RtDefines.h"

#ifndef RT_WIN32

#include <stdlib.h>
#include "RtTrace.h"
#include "RtStdCpp.h"

class CRtRemoveTrace
{
public:
	CRtRemoveTrace() {}
	~CRtRemoveTrace()
	{
		CRtString strCmd("rm -f ");
		strCmd.append(CRtTrace::instance()->get_trace_dir());
		strCmd.append("/");
		strCmd.append(CRtTrace::instance()->get_process_name());
		strCmd.append("_*");
		::system(strCmd.c_str());
		//printf("CRtRemoveTrace::~CRtRemoveTrace, cmd=%s\n", strCmd.c_str());
	}
	static CRtRemoveTrace s_rtRemoveTrace;
};

CRtRemoveTrace CRtRemoveTrace::s_rtRemoveTrace;

#endif // !RT_WIN32

#endif // __RT_REMOVETRACE_H__


